package com.anstudio.app.lhasa.service.controllers;

import com.anstudio.app.lhasa.common.modules.Response;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

import static com.anstudio.app.lhasa.common.enums.ResponseEnum.RESP_OK;

@RestController
public class PingController {

    @RequestMapping(value = "/ping", method = RequestMethod.GET)
    public Response ping(HttpServletResponse response) {
        response.setStatus(HttpServletResponse.SC_OK);
        return new Response().setResult(RESP_OK);
    }
}
